﻿using Aspose.Words;
namespace PageAdmin.Utils
{



    /// <summary>
    /// word文件帮助类
    /// </summary>
    public class WordHelper
    {
        public static void DocToHtml(string wordFile)
        {
            wordFile = IOHelper.MapPath(wordFile);
            Aspose.Words.Document doc = new Aspose.Words.Document(wordFile);
            Aspose.Words.Saving.HtmlSaveOptions options = new Aspose.Words.Saving.HtmlSaveOptions();
            options.ExportRoundtripInformation = true;
            string targetFile = IOHelper.MapPath($"/upload/~temp/{StringHelper.NewGuid()}/doc.html");
            doc.Save(targetFile,options);
        }

    }
}